import 'package:flutter/material.dart';

class MyApp9 extends StatelessWidget {
  const MyApp9({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'Row布局',
          style: TextStyle(
            fontSize: 20,
            fontWeight: FontWeight.bold,
            color: Colors.white,
          ),
        ),
        centerTitle: true,
        backgroundColor: Colors.red,
      ),
      body: Center(
        child: Container(
          margin: const EdgeInsets.only(top: 20, left: 20, right: 20),
          width: MediaQuery.of(context).size.width,
          height: 90,
          color: Colors.blue[100],
          child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Image.network(
                'https://yanxuan-item.nosdn.127.net/afd6199278a5b8fd783bc4947960fabc.jpg',
                width: 50,
                fit: BoxFit.cover,
              ),
              SizedBox(width: 20),
              const Text('茶水分离杯耐热隔热玻璃杯'),
              Padding(
                padding: const EdgeInsets.only(left: 15),
                child: const Icon(Icons.favorite),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
